﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>t1</title>
    <link rel="stylesheet" href="/CSS/global.css" type="text/css" />
    <link rel="stylesheet" href="/CSS/login.css" type="text/css" />
    <link rel="stylesheet" href="/CSS/register.css" type="text/css" />
    <script src="/Script/jquery.min.js" type="text/javascript"></script>
    <script src="/Script/valiDator/formValidator.js" type="text/javascript"></script>
    <script src="/Script/valiDator/formValidatorRegex.js" type="text/javascript"></script>
    <script src="/Script/artDialog/jquery.artDialog.source.js?skin=chrome" type="text/javascript"></script>
    <script src="/Script/district.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" action="/Ajax/Account/Register.ashx?callback=?">
    <!--S登录头部-->
    <div class="login_head">
        <div class="g_logo">
            <a href="#" title="生意汇">
                <img src="/images/login/logo.jpg" alt="生意汇" /></a></div>
        <div class="reg_welcome">
            <span>欢迎注册</span><br />
            发布产品、发布求购、订阅商机、在线洽谈,您都即将拥有！</div>
        <div class="reg_top blue">
            <a href="#">登录</a><span>|</span><a href="#">帮助中心</a><span>|</span><a href="#">产品</a><span>|</span><a
                href="#">求购</a><span>|</span><a href="#">企业</a></div>
    </div>
    <!--E登录头部-->
    <div class="reg_con">
        <div class="reg_con_login">
            已经是会员，现在去<a href="#" class="blue">登录</a></div>
        <div class="reg_con_left">
            <div class="reg_block1">
                欢迎注册生意汇（<font class="red">* </font>为必填项）<font class="orange">注意事项：注册信息人工审核，信息不全，不实，垃圾信息，重复注册等一律删除。</font></div>
            <div class="reg_block2">
                <ul>
                    <li><strong><font class="red">*</font> 会员身份</strong>
                        <input id="xiaoshou" type="radio" name="shenfen" value="0" checked="checked" /><label
                            for="ddlSex_0">卖家</label>
                        <input id="caigou" type="radio" name="shenfen" value="1" /><label for="ddlSex_1">买家</label>&nbsp;&nbsp;
                        <input id="other" type="radio" name="shenfen" value="2" />两者都是 <span class="Validform_checktip">
                        </span></li>
                    <li><strong><font class="red">&nbsp;&nbsp;*</font> 用户名</strong>
                        <input type="text" name="txtName" id="txtName" value="" class="reg_UserName" datatype="range1"
                            nullmsg="不支持中文命名,6~18个字符,英文、数字、下划线均可." sucmsg="用户名还未被使用，可以注册！" errormsg="注意：用户名只能是字母或数字,并成为唯一的，请认真填写。" />
                        <div class="divAccountNotice" style="position: absolute; left: 410px; z-index: 10;">
                        </div>
                        <span class="Validform_checktip"></span></li>
                    <li><strong><font class="red">*</font> 设置密码</strong>
                        <input type="password" name="txtPwd" id="txtPwd" value="" class="reg_UserName" datatype="*6-16"
                            errormsg="密码范围在6~16位之间！" nullmsg="密码范围在6~16位之间！" />
                        <div class="divAccountNotice" style="position: absolute; left: 410px; z-index: 10;">
                        </div>
                        <span class="Validform_checktip"></span></li>
                    <li><strong><font class="red">*</font> 确认密码</strong>
                        <input type="password" name="txtPwd2" value="" id="txtPwd2" datatype="*6-16" errormsg="您两次输入的账号密码不一致！"
                            nullmsg="密码范围在6~16位之间！" recheck="txtPwd" class="reg_UserName" />
                        <div class="divAccountNotice" style="position: absolute; left: 410px; z-index: 10;">
                        </div>
                        <span class="Validform_checktip"></span></li>
                    <li class="reg_dashed"><strong><font class="red">*</font> 电子邮箱</strong>
                        <input type="text" name="txtEmail" id="txtEmail" class="reg_UserName" datatype="range2"
                            errormsg="请填写有效的电子邮箱，如xxx@163.com" nullmsg="邮箱是找回金铺密码的重要条件，请谨慎填写。" />
                        <div class="divAccountNotice" style="position: absolute; left: 410px; z-index: 10;">
                        </div>
                        <span class="Validform_checktip"></span></li>
                    <li><strong><font class="red">*</font> 公司名称</strong>
                        <input type="text" name="txtCompName" id="txtCompName" class="reg_UserName" value=""
                            datatype="range3" nullmsg="请填写营业执照上的公司名称！" errormsg="公司名称是5-20汉字,请确认！" />
                        <div class="divAccountNotice" style="position: absolute; left: 410px; z-index: 10;">
                        </div>
                        <span class="Validform_checktip"></span></li>
                    <li><strong><font class="red">&nbsp;&nbsp;*</font> 联系人</strong>
                        <input type="text" name="txtRealName" id="txtRealName" class="reg_Contact" value=""
                            datatype="*1-5" nullmsg="请填写您的真实姓名！" errormsg="请输入汉字！" />
                        <input id="man" name="sex" type="radio" value="1" checked="checked" /><label for="ddlSex_0">先生</label>
                        <input id="mm" type="radio" name="sex" value="0" /><label for="ddlSex_1">女士</label>
                        <div class="divAccountNotice" style="position: absolute; left: 410px; z-index: 10;">
                        </div>
                        <span class="Validform_checktip"></span></li>
                    <li><strong><font class="red">*</font> 手机号码</strong>
                        <input name="txtMobile" id="txtMobile" type="text" value="" class="reg_UserName"
                            datatype="m" nullmsg="请输入你的手机号码！" errormsg="手机号码必须是11位的,请确认" />
                        <div class="divAccountNotice" style="position: absolute; left: 410px; z-index: 10;">
                        </div>
                        <span class="Validform_checktip"></span></li>
                    <li><strong><font class="red">&nbsp;&nbsp;&nbsp;</font> 常用QQ</strong>
                        <input type="text" name="txtQQ" id="txtQQ" class="reg_UserName" value="" />
                        <div class="divAccountNotice" style="position: absolute; left: 410px; z-index: 10;">
                        </div>
                    </li>
                    <li class="reg_address"><strong><font class="red">*</font> 所在地区</strong>
                        <select id="selectProvince" name="selectProvince" class="ddlArea_p">
                        </select>
                        <select id="selectCity" name="selectCity" class="ddlArea_t">
                        </select>
                        <select id="selectArea" name="selectArea" class="ddlArea_q" datetype="*" nullmsg="请选择所在地！">
                        </select>
                        <input type="hidden" id="shengID1" name="sheng" />
                        <input type="hidden" id="shiID1" name="shi" />
                        <input type="hidden" id="diquID1" name="diqu" />
                        <span class="Validform_checktip"></span></li>
                    <li><strong><font class="red"></font></strong>@*   <input name="txtComname" type="text" maxlength="20" value="" class="reg_CaiGou" />*@
                        <a href="javascript:yanzm();">获取验证码</a>
                        <div class="divAccountNotice" style="position: absolute; left: 410px; z-index: 10;">
                        </div>
                    </li>
                    <li><strong><font class="red">&nbsp;&nbsp;*</font> 验证码</strong> @*    
                        <a href="javascript:ChangeImgCode();" class="e_changeImg">换一张</a>*@
                        <input type="text" name="txtCheckCode" id="txtCheckCode" class="reg_Validator" datatype="range4"
                            sucmsg="验证码正确！" nullmsg="请输入验证码！" errormsg="请输入正确验证码！" />
                        <div class="divValidatorNotice" style="position: absolute; left: 500px; z-index: 10;">
                        </div>
                        <span class="txtCheckCodeTip"></span></li>
                    <li>
                        <input name="cbAllow" id="cbAllow" type="checkbox" checked="checked" />
                        <a href="#" target="_blank" class="blue">我已经阅读并接受生意汇用户协议</a> </li>
                </ul>
            </div>
            <div class="reg_submit">
                <input type="image" id="imgBtn" src="/images/register/submit.jpg" value="立即注册" />
            </div>
            <img id="img_waiting" src="/images/register/ajaxwaiting.gif" style="display: none;" />
        </div>
        <div class="reg_con_right">
            <div class="con_right_1">
                <strong>生意汇</strong>为企业提供在线做生意、结商友的信息平台。</div>
            <div class="con_right_2 grey">
                <span class="dred" style="font-size: 20px;">注册生意汇</span><br />
                立即开启财富大门</div>
            <div class="con_right_3">
                <div class="con_right_3_1 grey">
                    <b><font style="color: #000000; line-height: 30px;">注册成功，您即可：</font></b><br />
                    免费开通商铺发布产品<br />
                    免费品牌推广，树立企业形象<br />
                    免费发布供应信息，轻松坐等订单<br />
                    搜索求购信息，主动出击找买家<br />
                    海量产品信息，轻松甄别筛选<br />
                    免费发布求购信息，节约采购成本<br />
                    降低采购风险，共建诚信交易<br />
                </div>
                <div class="con_right_3_2">
                    你想在流量上万的网站上发布广告嘛，赶快注册吧！</div>
                <div class="con_right_3_3 dred">
                    抢占广告位，机会不容错过！</div>
            </div>
            <div class="blue" style="text-align: center; height: 40px; line-height: 40px;">
                如需帮助，拨打13253532256</div>
        </div>
    </div>
    <div class="clear">
    </div>
    <div class="opinion">
        <a href="#">欢迎对注册页面提出宝贵建议</a></div>
    <div class="clear">
    </div>
    <div class="login_footer">
        <a href="#">生意汇介绍</a><span>|</span><a href="#">广告服务</a><span>|</span><a href="#">联系我们</a><span>|</span><a
            href="#">产品信息</a><span>|</span><a href="#">求购信息</a><span>|</span> <a href="#">明星企业</a><span>|</span><a
                href="#">疑难解答</a><span>|</span><a href="#">公司新闻</a><span>|</span><a href="#">帮助中心</a><span>|</span><a
                    href="#">友情链接</a> <span>|</span><a href="#">意见反馈</a> <span>|</span>
        <a href="#">站长地图</a>
    </div>
    </form>
    <script type="text/javascript">
        $(function () {
            //绑定省市地区
            $("#selectProvince").change(function () {
                $("#shengID1").val(this.value);
            });
            $("#selectCity").change(function () {
                $("#shiID1").val(this.value);
            });
            $("#selectArea").change(function () {
                $("#diquID1").val(this.value);
            });

            qhwDistrict.provinceSeleter = $("#selectProvince"); //绑定省份控件
            qhwDistrict.citySeleter = $("#selectCity"); //绑定城市控件
            qhwDistrict.areaSeleter = $("#selectArea"); //绑定地区控件

            qhwDistrict.defaultProvinceID = ""; //省份初始值
            qhwDistrict.defaultCityID = ""; //城市初始值
            qhwDistrict.defaultAreaID = ""; //地区初始值
            qhwDistrict.bindData(); //开始绑定数据

            $.formValidator.initConfig({ formID: "form1", onError: function (msg) { }, theme: "ArrowSolidBox", onSuccess: function () { AddInfo(); } });
            //用户名
            $("#txtName").formValidator({ onShow: "不支持中文命名,6~18个字符,英文、数字、下划线均可.",
                                         onFocus: "不支持中文命名,6~18个字符,英文、数字、下划线均可.", onCorrect: "√" }).inputValidator({ min: 6, max: 18, onError: "注意：用户名会成为是金铺域名前缀，请认真填写。" }).regexValidator({ regExp: "username", dataType: "enum", onError: "您输入的用户名格式不正确，请确认" })
                            				.ajaxValidator({
                            				    url: "/ajax/Account/CheckUserName.ashx",
                            				    datatype: "text",
                            				    success: function (value) {
                            				        if (value == "y") {
                            				            return true;
                            				        }
                            				        return "该用户名已被注册";
                            				    },
                            				    buttons: $("#imgBtn"),
                            				    error: function () { $("#txtNameTip").html("服务器正忙，请重试"); },
                            				    onWait: "正在验证合法性，请稍候...",
                            				    onError: "该用户名已被注册"
                            				});
            //密码
            $("#txtPwd").formValidator({ onShow: "6~16个字符，区分大小写", onFocus: "6~16个字符，区分大小写", onCorrect: "√" }).inputValidator({ min: 6, max: 16, empty: { leftEmpty: false, rightEmpty: false, emptyError: "密码两边不能有空符号" }, onError: "密码长度有误，请确认" }).compareValidator({ desID: "txtName", operateor: "!=", onError: "密码不能与用户名相同" });
            //密码确认
            $("#txtPwd2").formValidator({ onShow: "请再输入一遍您上面填写的密码", onFocus: "请再输入一遍您上面填写的密码", onCorrect: "√" }).inputValidator({ min: 6, max: 16, empty: { leftEmpty: false, rightEmpty: false, emptyError: "确认密码两边不能有空符号" }, onError: "确认密码不能为空，请确认" }).compareValidator({ desID: "txtPwd", operateor: "=", onError: "两次密码不一致,请确认" });
            //邮箱
            $("#txtEmail").formValidator({ onShow: "请输入您常用的电子邮箱，方便您找回密码！", onFocus: "请输入您常用的电子邮箱，方便您找回密码！", onCorrect: "√" }).inputValidator({ min: 3, onError: "邮箱是找回金铺密码的重要条件，请谨慎填写。" }).regexValidator({ regExp: "email", dataType: "enum", onError: "请填写有效的电子邮箱，如xxx@qq.com" }).ajaxValidator({
                url: "/ajax/Account/CheckUserEmail.ashx",
                datatype: "text",
                success: function (value) {
                    if (value == "y") {
                        return true;
                    }
                    return "该邮箱地址已被注册";
                },
                buttons: $("#imgBtn"),
                error: function () {
                    $("#txtEmailTip").html("服务器正忙，请重试");
                },
                onWait: "正在验证合法性，请稍候...",
                onError: "网络异常"

            });
            //QQ
            $("#txtQQ").formValidator({ empty: true, onFocus: "请输入QQ号码" }).regexValidator({ regExp: "qq", dataType: "enum", onError: "QQ格式不正确！" });
      
        });

        function AddInfo() {
          //性别
            var sex = document.getElementsByName("sex");
            for (var i = 0; i < sex.length; i++) {
                if (sex[i].checked == true) {
                    $("#_sex").val(sex[i].value)
                }

            }
            //省市三级联动
            var shenfen = document.getElementsByName("shenfen");
            for (var i = 0; i < shenfen.length; i++) {
                if (shenfen[i].checked == true)
                    $("#_shenfen").val(shenfen[i].value)
            }
            $("#_DistrictStr").val($("#selectProvince").find("option:selected").val() + "," + $("#selectCity").find("option:selected").val() + "," + $("#selectArea").find("option:selected").val());

            $.ajax({
                type: "POST",
                url: "account/t1post",
                data: $("form").serialize(),
                cache: false,
                dataType: "text",
                error: function () {
                    alert("错误");
                },
                success: function (msg) {
                    //                    if (msg == "2") {
                    //                        art.dialog({
                    //                            title: "提示",
                    //                            content: "请确认必填信息都已填写,且格式正确！"
                    //                        });
                    //                        $("#img_waiting").hide();
                    //                    }

                    alert("1");
                }
            });
        }
    </script>
</body>
</html>
